package com.nektos.ccf.client;

import java.io.Serializable;

import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;

public class MouseOverPopup extends PopupPanel implements Serializable, MouseOutHandler, MouseOverHandler  {
    MouseOverPopup(String description) {
        super(true);
        setWidget(new Label(description));
        setWidth("300px");
    }
	@Override
	public void onMouseOver(MouseOverEvent event) {
        this.setPopupPosition(event.getClientX(), event.getClientY()+10);
        this.show();
	}
	@Override
	public void onMouseOut(MouseOutEvent event) {
        this.hide();
	}

}
